/*
*
* Copyright (C) 2004 - 2008 BitLaboratory (see http://www.bitlaboratory.com)
* All rights reserved. 
*
* Redistribution and use in source and binary forms, with or without modification, 
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
*    this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
*    this list of conditions and the following disclaimer in the documentation
*    and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
*    derived from this software without specific prior written permission. 
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 
* OF SUCH DAMAGE.
*
* You can find the latest version of this library at http://www.bitlaboratory.com
*
*/


using System;
using BitLaboratory.Win32Api;
using System.Runtime.InteropServices;

namespace BitLaboratory.Win32Api.COM.Interfaces
{
	/// <summary>
	/// Summary description for IOleObject.
	/// </summary>
	[ComVisible(true), ComImport(),
	Guid("00000112-0000-0000-C000-000000000046"),
	InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]
	public interface IOleObject
	{
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int SetClientSite([In, MarshalAs(UnmanagedType.Interface)] IOleClientSite
			pClientSite);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetClientSite([Out, MarshalAs(UnmanagedType.Interface)] out IOleClientSite site);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int SetHostNames([In, MarshalAs(UnmanagedType.LPWStr)] String
			szContainerApp, [In, MarshalAs(UnmanagedType.LPWStr)] String
			szContainerObj);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int Close([In,MarshalAs(UnmanagedType.U4)] uint dwSaveOption);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int SetMoniker([In, MarshalAs(UnmanagedType.U4)] uint dwWhichMoniker, [In,
			MarshalAs(UnmanagedType.Interface)] Object pmk);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetMoniker([In, MarshalAs(UnmanagedType.U4)] uint dwAssign, [In,
			MarshalAs(UnmanagedType.U4)] uint dwWhichMoniker,[Out,MarshalAs(UnmanagedType.Interface)] out Object moniker);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int InitFromData([In, MarshalAs(UnmanagedType.Interface)] Object
			pDataObject, [In, MarshalAs(UnmanagedType.Bool)] Boolean fCreation, [In,
			MarshalAs(UnmanagedType.U4)] uint dwReserved);
		int GetClipboardData([In, MarshalAs(UnmanagedType.U4)] uint dwReserved, out
			Object data);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int DoVerb([In, MarshalAs(UnmanagedType.I4)] int iVerb, [In] IntPtr lpmsg,
			[In, MarshalAs(UnmanagedType.Interface)] IOleClientSite pActiveSite, [In,
			MarshalAs(UnmanagedType.I4)] int lindex, [In] IntPtr hwndParent, [In] RECT
			lprcPosRect);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int EnumVerbs(out Object e); // IEnumOLEVERB
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int OleUpdate();
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int IsUpToDate();
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetUserClassID([In, Out] ref Guid pClsid);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetUserType([In, MarshalAs(UnmanagedType.U4)] uint dwFormOfType, [Out,
			MarshalAs(UnmanagedType.LPWStr)] out String userType);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int SetExtent([In, MarshalAs(UnmanagedType.U4)] uint dwDrawAspect, [In]
			Object pSizel); // tagSIZEL
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetExtent([In, MarshalAs(UnmanagedType.U4)] uint dwDrawAspect, [Out]
			Object pSizel); // tagSIZEL
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int Advise([In, MarshalAs(UnmanagedType.Interface)] IAdviseSink pAdvSink, out
			int cookie);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int Unadvise([In, MarshalAs(UnmanagedType.U4)] int dwConnection);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int EnumAdvise(out Object e);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int GetMiscStatus([In, MarshalAs(UnmanagedType.U4)] uint dwAspect, out int
			misc);
		[return: MarshalAs(UnmanagedType.I4)][PreserveSig]
		int SetColorScheme([In] Object pLogpal); // tagLOGPALETTE
	}
}
